<?php

	class treeview
	{
		var $htmlstr;

		function treeview($id,$imgid,$childid,$txt,$def)
		{
			echo "<!-- EZPZ Treeview 1.0 -->";
			echo "<div id='$id'>";
			if ($def == 1)
			{
				echo "<a href=\"javascript:void(0)\" onclick=\"toggle('$childid','$imgid')\"><img id=\"$imgid\"  align=\"absmiddle\" border=\"0\" src=\"images/imgFolder1.gif\">$txt</a>";
			}
			else
			{
				echo "<a href=\"javascript:void(0)\" onclick=\"toggle('$childid','$imgid')\"><img id=\"$imgid\"  align=\"absmiddle\" border=\"0\" src=\"images/imgFolder0.gif\">$txt</a>";

			}
			
			
		}

		function addItem($menutxt)
		{
			echo "<li style=\"padding: 0px; margin:0px; background:url('images/line_vertical.gif');background-repeat:repeat-y\">";
			echo "<img src=\"images/line_branch.gif\" align=\"absmiddle\"><img src=\"images/html.gif\" align=\"absmiddle\">$menutxt";
			echo "</li>";


		}

		function addItemLast($menutxt,$parentflag)
		{
			echo "<li style=\"padding: 0px; margin:0px;\">";
			echo "<img src=\"images/line_corner.gif\" align=\"absmiddle\"><img src=\"images/html.gif\" align=\"absmiddle\">$menutxt";
			echo "</li>";
			echo "</ul>";
			if ($parentflag == 1)
			{
				echo "</li>";
			}

		}

		function addTree($imgid,$childid,$txt,$def)
		{
			echo "<li style=\"padding: 0px; margin:0px; background:url('images/line_vertical.gif');background-repeat:repeat-y\">";
			if ($def == 1)
			{
				echo "<a href=\"javascript:void(0)\" onclick=\"toggle('$childid','$imgid')\"><img src=\"images/line_branch.gif\" align=\"absmiddle\" border=\"0\"><img id=\"$imgid\"  align=\"absmiddle\" border=\"0\" src=\"images/imgFolder1.gif\">$txt</a>";
			}
			else
			{
				echo "<a href=\"javascript:void(0)\" onclick=\"toggle('$childid','$imgid')\"><img src=\"images/line_branch.gif\" align=\"absmiddle\" border=\"0\"><img id=\"$imgid\"  align=\"absmiddle\" border=\"0\" src=\"images/imgFolder0.gif\">$txt</a>";

			}


		}

		function addTreeLast($imgid,$childid,$txt,$def)
		{
			echo "<li style=\"padding: 0px; margin:0px;\">";
			if ($def == 1)
			{
				echo "<a href=\"javascript:void(0)\" onclick=\"toggle('$childid','$imgid')\"><img src=\"images/line_corner.gif\" align=\"absmiddle\" border=\"0\"><img id=\"$imgid\"  align=\"absmiddle\" border=\"0\" src=\"images/imgFolder1.gif\">$txt</a>";
			}	
			else
			{
				echo "<a href=\"javascript:void(0)\" onclick=\"toggle('$childid','$imgid')\"><img src=\"images/line_corner.gif\" align=\"absmiddle\" border=\"0\"><img id=\"$imgid\"  align=\"absmiddle\" border=\"0\" src=\"images/imgFolder0.gif\">$txt</a>";
	
			}


		}

		function endtree()
		{
			echo "</ul>";
		}

		function addNode($id,$level,$def)
		{
			if ($level == 1)
			{
				if ($def == 1)
				{
					echo "<ul id='$id' style='padding:0px;margin:0px 0px 0px 20px;list-style-type:none;display:block'> ";
				}
				else
				{
					echo "<ul id='$id' style='padding:0px;margin:0px 0px 0px 20px;list-style-type:none;display:none'> ";

				}
			}
			else
			{
				if ($def == 1)
				{

					echo "<ul id='$id' style='padding:0px;margin:0px 0px 0px 0px;list-style-type:none;display:block'> ";

				}
				else
				{
					echo "<ul id='$id' style='padding:0px;margin:0px 0px 0px 0px;list-style-type:none;display:none'> ";
				}		

			}

		}
		function showTree()
		{
			echo "</div>";

		}

	}

	$mytree = new treeview("mytree","easyimage","easyweb","Easy Web Page Design",1);
	$mytree->addNode("easyweb",0,1);
	$mytree->addItem("<a href='http://www.easywebpagedesign.com'>Home</a>");
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/cPSupport'>Contact</a>");
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/books.html'>Books</a>");
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/resources.html'>Resources</a>");
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/forum/'>Forum</a>");
	$mytree->addTree("toolsimage","toolsweb","Tools",1);
	$mytree->addNode("toolsweb",1,1);
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/template_creator.html'>Template Creator</a>");
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/soccersites/index.html'>SoccerSite</a>");
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/ezhpad.html'>EZHPad</a>");
	$mytree->addItemLast("<a href='http://www.easywebpagedesign.com/jsmenumaker.html'>JS Menu Maker</a>",1);
	$mytree->addTree("scriptimage","scriptweb","Scripts",1);
	$mytree->addNode("scriptweb",1,1);
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/ezpzmenu.html'>EZPZ Menu</a>");
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/ezpzedit.html'>EZPZ DHTML Editor</a>");
	$mytree->addItemLast("<a href='http://www.easywebpagedesign.com/ezpzcolor.html'>EZPZ Color Picker</a>",1);
	$mytree->addTree("tutimage","tutweb","Tutorials",1);
	$mytree->addNode("tutweb",1,1);
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/creating_websites.html'>Creating Websites</a>");
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/how_the_web_works.html'>How The Web Works</a>");
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/html_editor_guide.html'>HTML Editor Guide</a>");
	$mytree->addTree("htmlimage","htmlweb","HTML",1);
	$mytree->addNode("htmlweb",1,1);
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/first_web_page.html'>First Web Page</a>");
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/html_colors.html'>HTML Colors</a>");
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/html_background.html'>HTML Background</a>");
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/html_text.html'>Formatting Text</a>");
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/html_headings.html'>Headings</a>");
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/html_fonts.html'>Fonts</a>");
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/html_layout.html'>Layout</a>");
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/html_hr.html'>Horizontal Rules</a>");
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/html_lists.html'>Lists</a>");
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/html_special.html'>Special</a>");
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/html_images.html'>Images</a>");
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/html_tables.html'>Tables</a>");
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/html_table_code.html'>More Tables</a>");
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/html_links.html'>Links</a>");
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/html_image_maps.html'>Image Maps</a>");
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/html_frames.html'>Frames</a>");
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/html_forms.html'>Forms</a>");
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/email_html.html'>Sending Email</a>");
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/goody_html.html'>HTML Goodies</a>");
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/html_tab.html'>Making a tab</a>");
	$mytree->addItemLast("<a href='http://www.easywebpagedesign.com/html_marquee.html'>Marquees</a>",1);
	$mytree->addTree("cssimage","cssweb","CSS",1);
	$mytree->addNode("cssweb",1,1);
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/css_definition.html'>Definition</a>");
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/css_properties.html'>Properties</a>");
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/css_pseudo_classes.html'>Pseudo Classes</a>");
	$mytree->addItemLast("<a href='http://www.easywebpagedesign.com/css_media.html'>Media Types</a>",1);
	$mytree->addTreeLast("jsimage","jsweb","javascript",1);
	$mytree->addNode("jsweb",1,1);
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/javascript_definition.html'>Definition</a>");
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/javascript_variables.html'>Variables</a>");
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/javascript_arithmetic.html'>Arithmetic</a>");
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/javascript_conditions.html'>Conditions</a>");
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/javascript_functions.html'>Functions</a>");
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/javascript_timers.html'>Timers/Events</a>");
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/javascript_dom.html'>DOM</a>");
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/javascript_array.html'>Arrays</a>");
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/javascript_image.html'>Images</a>");
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/javascript_link.html'>Links</a>");
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/javascript_history.html'>History</a>");
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/javascript_windows.html'>Windows</a>");
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/javascript_string.html'>Strings</a>");
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/javascript_dates.html'>Dates</a>");
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/javascript_maths.html'>Maths</a>");
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/javascript_forms.html'>Forms</a>");
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/javascript_frames.html'>Frames</a>");
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/javascript_navigation.html'>Navigation</a>");
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/javascript_comments.html'>Comments</a>");
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/javascript_listview.html'>Sorting Table Data</a>");
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/javascript_window_reload.html'>Reloading Windows</a>");
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/javascript_void0.html'>Links and functions</a>");
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/javascript_update_meta.html'>Update Meta Tags</a>");
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/box_dropdown_java_script_script.html'>Jump menus</a>");
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/java_script_window_open.html'>Opening windows</a>");
	$mytree->addItemLast("<a href='http://www.easywebpagedesign.com/java_script_window_close.html'>Closing windows</a>",1);
	$mytree->endtree();

	$mytree->addTreeLast("artimage","artweb","articles",1);
	$mytree->addNode("artweb",1,1);
	$mytree->addTree("artdimage","desweb","Web Design",1);
	$mytree->addNode("desweb",1,1);
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/create_google_sitemap.html'>Google Sitemap</a>");
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/javascript_webring.html'>Javascript Webring</a>");
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/news_headlines.html'>Add news headlines</a>");
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/earn_money.html'>Earn Money</a>");
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/useful_scripts.html'>Useful Scripts</a>");
	$mytree->addItemLast("<a href='http://www.easywebpagedesign.com/html_site_myspace.html'>Myspace Guide</a>",1);
	$mytree->addTreeLast("artmimage","masweb","Web Master",1);
	$mytree->addNode("masweb",1,1);
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/google_pagerank.html'>Google Pagerank</a>");
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/customised_tshirts.html'>Customised tshirts</a>");
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/affiliate_programs.html'>Affiliate Programs</a>");
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/rentabuyer.html'>Low Cost Design</a>");
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/get_more_hits.html'>SEO</a>");
	$mytree->addItem("<a href='http://www.easywebpagedesign.com/beware_seo.html'>Beware SEO</a>");
	$mytree->addItemLast("<a href='http://www.easywebpagedesign.com/html_inbanner.html'>Target Keywords</a>",1);
	$mytree->showTree();

?>